package 时间;

import java.time.Instant;
import java.time.format.DateTimeFormatter;

public class tt {
    public static void main(String[] args) {
        String time;
        Instant instant = Instant.now();
        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH-mm-ss");
        System.out.println(dtf.format(instant));;

    }
}
